package cn.yt4j.layuirbac.controller;

import cn.yt4j.layuirbac.model.User;
import cn.yt4j.layuirbac.service.UserService;
import cn.yt4j.layuirbac.vo.LyauiResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author gyv12345@163.com
 */
@RestController
@RequestMapping("user")
public class UserController {
    @Autowired
    private UserService userService;

    @GetMapping("list")
    public LyauiResponse list(Integer page, Integer limit, User user) {
        return LyauiResponse.ok(userService.list(page, limit,user));
    }
}
